import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';

export type DeviceDataDocument = HydratedDocument<DeviceData>;

@Schema()
export class DeviceData {
  @Prop({
    type : 'number'
  })
  deviceId: number;

  @Prop({
    type : Object
  })
  data : {
    hardware : string;
    software : string;
    
  }
}

export const DeviceDataSchema = SchemaFactory.createForClass(DeviceData);
